Skip to content

Feat: async load prompt#83

Open
Mahhheshh (Mahhheshh) wants to merge 2 commits intobraintrustdata:mainfrom
Mahhheshh:fix/28
Open

Feat: async load prompt#83
Mahhheshh (Mahhheshh) wants to merge 2 commits intobraintrustdata:mainfrom
Mahhheshh:fix/28

Conversation

@Mahhheshh
Copy link
Contributor

fixes #28

The base for this PR was worked upon by Ankur in (braintrustdata/braintrust-sdk-javascript#771)

I have adapted with the changes of load_prompt.

working upon the tests; would require some guidance

@AbhiPrasad
Copy link
Member

I'm going to spend a little more time thinking about this API, so not going to immediately open this. Need to make sure this is the right thing to work on.

Ankur Goyal (ankrgyl) and others added 2 commits March 25, 2026 19:36
ankur's work from braintrustdata/braintrust-sdk-javascript#771
Co-authored-by: Mahhheshh <100200105+Mahhheshh@users.noreply.github.com>
"otel": ["opentelemetry-api", "opentelemetry-sdk", "opentelemetry-exporter-otlp-proto-http"],
# orjson is not compatible with PyPy, so we exclude it for that platform
"performance": ["orjson; platform_python_implementation != 'PyPy'"],
"performance": ["orjson; platform_python_implementation != 'PyPy'", "aiohttp"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this from install_requires to extras_require.
comment: braintrustdata/braintrust-sdk-javascript#771 (comment)

HTTP_REQUEST_THREAD_POOL,
lambda: _state._prompt_cache.get(
slug,
version=str(version) if version else "latest",
Copy link
Contributor Author

@Mahhheshh Mahhheshh (Mahhheshh) Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just "latest"?

@Mahhheshh
Copy link
Contributor Author

force push after resolving merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Async prompt loading support

3 participants